<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <title>放行条</title>
    <meta name="viewport"
        content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="./css/headersearch.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui-pull-refresh.css" />
    <link rel="stylesheet" type="text/css" href="../css/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="css/comm.css" />
    <link rel="stylesheet" type="text/css" href="css/form.css" />
    <link rel="stylesheet" type="text/css" href="css/editStyle.css" />
    <link rel="stylesheet" type="text/css" href="../script/mui/mui.picker.min.css" />
    <link rel="stylesheet" type="text/css" href="../script/mui/mui.reset.css" />
    <link rel="stylesheet" type="text/css" href="../script/vant/index.css" />
    <link rel="stylesheet" type="text/css" href="css/customerservicelist.css" />
    <link rel="stylesheet" type="text/css" href="css/releaserecord_frm.css" />
    <style>

    </style>
</head>

<body>
    <div id="app" v-cloak>

        <!-- 待处理-筛选 -->
        <div class="maskbg" v-on:click="doCloseSearchOne()" v-if="IsShowSearchOne"></div>
        <div v-if="showsearchparamone" class="searchparam" style="top: 100px;">
            <div class="searchcontent" style="height: 100%;">
                <div class="searchparamtitle">
                    所属项目
                </div>
                <div class="searchparamitem">
                    <label v-on:click="doSearchProjectOne(item.ID,item.Name)"
                        v-bind:class="{'active':formone.ProjectIDs.indexOf(item.ID)>-1}"
                        v-for="item in searchProjectList">{{item.Name}}</label>
                </div>
                <div class="searchparamtitle">
                    通行事由
                </div>
                <div class="searchparamitem">
                    <label v-on:click="doSearchVisitTypeOne(item.ID,item.Name)"
                        v-bind:class="{'active':formone.VisitTypeIDs.indexOf(item.ID)>-1}"
                        v-for="item in typelist2">{{item.Name}}</label>
                </div>
                <div class="searchparamtitle">
                    放行时间
                </div>
                <div class="searchparamitem">
                    <label v-bind:class="{'active':formone.activeDate==1}" v-on:click="doClickDayOne(1)">近三天</label>
                    <label v-bind:class="{'active':formone.activeDate==2}" v-on:click="doClickDayOne(2)">近七天</label>
                    <label v-bind:class="{'active':formone.activeDate==3}" v-on:click="doClickDayOne(3)">近三十天</label>
                </div>
                <div class="searchparamtitle">
                    自定义查询日期
                </div>

                <div class="searchparamitem searchparamitem_input">
                    <i class="icon iconfont icon-rili"></i>
                    <span class="choose new-span-date" id="startdateone" data-options='{"type":"date"}'
                        v-bind:class="{'textColorPlaceholder':formone.startTime==''}">{{formone.startTime==''?'开始日期':formone.startTime}}</span>
                    <span style="padding: 0 10px;">
                        至
                    </span>
                    <span class="choose new-span-date" id="enddateone" data-options='{"type":"date"}'
                        v-bind:class="{'textColorPlaceholder':formone.endTime==''}">{{formone.endTime==''?'结束日期':formone.endTime}}</span>
                </div>
                <div class="aui_bottom searchbottom">
                    <div v-on:click="doResetOne()" class="aui_bottombtn left">重置</div>
                    <div v-on:click="doSearchOne()" class="aui_bottombtn right">确认</div>
                </div>
            </div>
        </div>
        <!-- 新增-项目名称 -->
        <div class="mask_bg" v-on:click="doCloseProject()" v-if="IsProjectOpen"></div>
        <div class="choose_box" v-if="IsProjectOpen">
            <div class="choose_room_title">
                <div class="choose_room_title">请选择项目名称</div>
            </div>
            <div class="choose_room_content">
                <div v-on:click="doSelectProject(item)" class="choose_room_item" v-for="item in ProjectList"
                    v-bind:class="{'selected':formtwo.ProjectID==item.ID}">
                    <label>{{item.Name}}</label><i v-bind:class="{'selected':formtwo.ProjectID==item.ID}"
                        class="icon iconfont icon-xuanze"></i>
                </div>
            </div>
        </div>
        <!-- 新增-通行事由 -->
        <div class="mask_bg" v-on:click="doCloseVisitType()" v-if="IsVisitTypeOpen"></div>
        <div class="choose_box" v-if="IsVisitTypeOpen">
            <div class="choose_room_title">
                <div class="choose_room_title">请选择通行事由</div>
            </div>
            <div class="choose_room_content">
                <div v-on:click="doSelectVisitType(item)" class="choose_room_item" v-for="item in typelist2"
                    v-bind:class="{'selected':formtwo.VisitType==item.ID}">
                    <label>{{item.Name}}</label><i v-bind:class="{'selected':formtwo.VisitType==item.ID}"
                        class="icon iconfont icon-xuanze"></i>
                </div>
            </div>
        </div>
        <!--新增-选择有效期-->
        <van-popup v-model:show="IsShowStartTime" round position="bottom" :style="{ height: '40%' }">
            <van-datetime-picker v-model="formtwo.StartTime" type="datetime" title="选择有效开始时间" :min-date="minDate"
                :max-date="maxDate" @confirm="onChooseStartTime" @cancel="doCloseStartTime" />
        </van-popup>
        <van-popup v-model:show="IsShowEndTime" round position="bottom" :style="{ height: '40%' }">
            <van-datetime-picker v-model="formtwo.EndTime" type="datetime" title="选择有效结束时间"
                :min-date="formtwo.StartTime" :max-date="maxDate" @confirm="onChooseEndTime" @cancel="doCloseEndTime" />
        </van-popup>
        <!-- 数据-筛选 -->
        <div class="maskbg" v-on:click="doCloseSearchThird()" v-if="IsShowSearchThird"></div>
        <div v-if="showsearchparam" class="searchparam" style="top: 100px;">
            <div class="searchcontent" style="height: 100%;">
                <div class="searchparamtitle">
                    所属项目
                </div>
                <div class="searchparamitem">
                    <label v-on:click="doSearchProject(item.ID,item.Name)"
                        v-bind:class="{'active':formthird.ProjectIDs.indexOf(item.ID)>-1}"
                        v-for="item in searchProjectList">{{item.Name}}</label>
                </div>
                <div class="searchparamtitle">
                    通行事由
                </div>
                <div class="searchparamitem">
                    <label v-on:click="doSearchVisitType(item.ID,item.Name)"
                        v-bind:class="{'active':formthird.VisitTypeIDs.indexOf(item.ID)>-1}"
                        v-for="item in typelist2">{{item.Name}}</label>
                </div>
                <div class="searchparamtitle">
                    状态
                </div>
                <div class="searchparamitem">
                    <label v-on:click="doSearchStatus(item.ID,item.Name)"
                        v-bind:class="{'active':formthird.StatusIDs.indexOf(item.ID)>-1}"
                        v-for="item in StatusList">{{item.Name}}</label>
                </div>
                <div class="searchparamtitle">
                    申请时间
                </div>
                <div class="searchparamitem">
                    <label v-bind:class="{'active':formthird.activeDate==1}" v-on:click="doClickDay(1)">近三天</label>
                    <label v-bind:class="{'active':formthird.activeDate==2}" v-on:click="doClickDay(2)">近七天</label>
                    <label v-bind:class="{'active':formthird.activeDate==3}" v-on:click="doClickDay(3)">近三十天</label>
                </div>
                <div class="searchparamtitle">
                    自定义查询日期
                </div>

                <div class="searchparamitem searchparamitem_input">
                    <i class="icon iconfont icon-rili"></i>
                    <span class="choose new-span-date" id="startdate" data-options='{"type":"date"}'
                        v-bind:class="{'textColorPlaceholder':formthird.startTime==''}">{{formthird.startTime==''?'开始日期':formthird.startTime}}</span>
                    <span style="padding: 0 10px;">
                        至
                    </span>
                    <span class="choose new-span-date" id="enddate" data-options='{"type":"date"}'
                        v-bind:class="{'textColorPlaceholder':formthird.endTime==''}">{{formthird.endTime==''?'结束日期':formthird.endTime}}</span>
                </div>
                <div class="aui_bottom searchbottom">
                    <div v-on:click="doReset()" class="aui_bottombtn left">重置</div>
                    <div v-on:click="doSearch()" class="aui_bottombtn right">确认</div>
                </div>
            </div>
        </div>
        <!-- 顶部tab -->
        <div class="new-van-tabs bgshadow">
            <van-tabs v-model="activeTab" @click="onClickTab" color="#289FFF" title-active-color="#000">
                <van-tab :title="item.Name" v-for="(item,index) in tabList" :key="index" />
            </van-tabs>
        </div>
        <!-- 待处理 -->
        <div v-if="activeTab==0">
            <div class="div-header bgshadow">
                <div class="aui-searchbar">
                    <div class="aui-searchbar-input aui-searchbar-input-white aui-border-radius" style="margin: 0;">
                        <i class="icon iconfont icon-sousuo"></i>
                        <input v-model="formone.keywords" type="search" v-on:keydown="handleEnterOne" placeholder="申请单位"
                            id="search-input">
                        <div v-if="formone.keywords" class="new-searchbar-clear-btn" v-on:click="doSearchClear()">
                            <i class="icon iconfont icon-guanbi"></i>
                        </div>
                    </div>
                    <div v-on:click="doClickSearchOne()" class="aui-searchbar-btn" tapmode
                        style="width: 1.6rem;margin-right: 0;margin-left: 0.5rem;padding-right: 0;">
                        <span>筛选</span>
                    </div>
                </div>
            </div>

            <div class="aui-content new-content-top-third">
                <div v-if="OneList.length>0" v-for="item in OneList" class="boxarea mainbox mb20">
                    <div v-on:click="open_details(item)" class="work_con_box ">
                        <div class="workheader">
                            <div class="work_title_add ellipsis_one fl" style="font-weight: bold;">
                                {{item.ApplyCompany?item.ApplyCompany:'无'}}</div>
                        </div>
                        <div class="work_con_box_time marginheight">
                            <div class="work_con_box_left">通行事由</div>
                            <div class="work_con_box_right">
                                <label>{{item.VisitTypeName}}</label>
                            </div>
                        </div>
                        <div class="work_con_box_time marginheight">
                            <div class="work_con_box_left">放行有效期</div>
                            <div class="work_con_box_right">
                                <label>{{item.StartTime}}至{{item.EndTime}}</label>
                            </div>
                        </div>

                        <div class="work_con_box_time marginheight">
                            <div class="work_con_box_left">申请时间</div>
                            <div class="work_con_box_right">
                                <label>{{item.AddTime}}</label>
                            </div>
                        </div>
                        <div class="cl"></div>
                    </div>

                    <div class="new_customer_typebox new_customer_listbox">
                        <div v-on:click="open_details(item)" class="text-bold">
                            <span
                                v-bind:class="{'text-blue':item.State==1,'text-red':item.State==2,'text-grey':item.State==3||item.State==4,'text-org':item.State==2&&item.StatusName=='未放行'}">{{item.StatusName}}</span>
                        </div>
                        <div>
                            <label v-on:click="examRelease(item,1)"
                                class="customer_beginbtn new_customer_btn">拒绝</label>
                            <label v-on:click="examRelease(item,0)" class="customer_beginbtn"
                                style="width: 85px;">同意</label>
                        </div>
                    </div>
                </div>
                <div v-if="OneList.length>0" class="notodayList mb20">
                    没有更多内容
                </div>
                <div class="noinfo" v-if="OneList.length<=0">
                    <img src="../image/index/noinfomsg_icon.png" alt="" />
                    <h5><br />暂无相关数据</h5>
                </div>
            </div>
        </div>
        <!-- 新增 -->
        <div v-if="activeTab==1" class="mt50 pb4">
            <div class="boxarea edit mt27">
                <div class="">
                    <div class="aui_formitem">
                        <div class="aui_formtitle">申请单位类型</div>
                        <div class="aui_formcontent">
                            <van-radio-group v-model="formtwo.Type" style="display: flex;float: right;">
                                <van-radio name="1" class="aui-margin-r-15">内部单位</van-radio>
                                <van-radio name="2">外部单位</van-radio>
                            </van-radio-group>
                        </div>
                    </div>
                    <div v-if="formtwo.Type==1" class="aui_formitem">
                        <div class="aui_formtitle">申请单位<img class="col-star" src="../image/redstar.png"></div>
                        <div class="aui_formcontent" v-on:click="do_select_project()">
                            <div class="moreproject"
                                v-bind:class="{'textColorPlaceholder':formtwo.FullName==''||formtwo.FullName==undefined}">
                                {{formtwo.FullName==''||formtwo.FullName==undefined?'请选择':formtwo.FullName}}</div>
                            <i class="icon iconfont icon-xiangyoujiantou"></i>
                        </div>
                    </div>
                    <div v-if="formtwo.Type==2" class="aui_formitem">
                        <div class="aui_formtitle">所属项目<img class="col-star" src="../image/redstar.png"></div>
                        <div class="aui_formcontent">
                            <input class="choose" readonly="readonly" placeholder="请选择" v-model="formtwo.ProjectName"
                                v-on:click="do_chooseProject()" type="text">
                            <i class="icon iconfont icon-xiangyoujiantou"></i>
                        </div>
                    </div>
                    <div v-if="formtwo.Type==2" class="aui_formitem">
                        <div class="aui_formtitle">申请单位<img v-if="formtwo.Type==2" class="col-star"
                                src="../image/redstar.png"></div>
                        <div class="aui_formcontent">
                            <input v-model="formtwo.ApplyCompany" placeholder="请填写" type="text">
                        </div>
                    </div>
                    <div class="aui_formitem">
                        <div class="aui_formtitle">申请人<img class="col-star" src="../image/redstar.png"></div>
                        <div class="aui_formcontent">
                            <input v-model="formtwo.OwnerName" placeholder="请填写" type="text">
                        </div>
                    </div>
                    <div class="aui_formitem">
                        <div class="aui_formtitle">手机号码<img class="col-star" src="../image/redstar.png"></div>
                        <div class="aui_formcontent">
                            <input v-model="formtwo.PhoneNumber" placeholder="请填写" type="text">
                        </div>
                    </div>
                    <div class="aui_formitem">
                        <div class="aui_formtitle">通行事由<img class="col-star" src="../image/redstar.png"></div>
                        <div class="aui_formcontent">
                            <input class="choose" readonly="readonly" placeholder="请选择" v-model="formtwo.VisitTypeName"
                                v-on:click="do_chooseVisitType()" type="text">
                            <i class="icon iconfont icon-xiangyoujiantou"></i>
                        </div>
                    </div>
                    <div class="aui_formitem">
                        <div class="aui_formtitle">有效开始时间</div>
                        <div class="aui_formcontent">
                            <!-- <input v-model="formtwo.CarNumber" placeholder="填写车辆信息" type="text"> -->
                            <label v-on:click="doOpenStartTime()" class="uni-input"
                                style="display:block;">{{showStartTime}}</label>
                        </div>
                    </div>
                    <div class="aui_formitem">
                        <div class="aui_formtitle">有效结束时间</div>
                        <div class="aui_formcontent">
                            <!-- <input v-model="formtwo.CarNumber" placeholder="填写车辆信息" type="text"> -->
                            <label v-on:click="doOpenEndTime()" class="uni-input"
                                style="display:block;">{{showEndTime}}</label>
                        </div>
                    </div>
                    <div class="aui_formitem border-bottom0">
                        <div class="aui_formtitle">车辆信息</div>
                        <div class="aui_formcontent">
                            <input v-model="formtwo.VehicleInformation" placeholder="填写车辆信息" type="text">
                        </div>
                    </div>
                </div>
            </div>
            <div class="boxarea edit">
                <div class="work_title new_work_title aui-margin-b-5">
                    物品信息 <span class="numberV text-grey">（{{formtwo.ReleaseInstructions.length}}/200）</span>
                </div>
                <div class="">
                    <div class="aui_formitem block border-bottom0">
                        <div class="aui_formcontent" style="padding-left: 0px;">
                            <textarea v-model="formtwo.ReleaseInstructions" placeholder="可填写需要具体通行原因，物品清单等。"
                                maxlength="200" style="height: 5rem;"></textarea>
                        </div>
                    </div>

                    <div class="imglist_box" style="display:flex;">
                        <div class="imglist_item" v-for="(item,index) in imglist">
                            <img v-on:click="do_viewimages(index)" class="imgitem ml4" v-bind:src="item.url" />
                            <img v-on:click="remove_img(index,item)" class="onmouse_close"
                                src="../image/close_mouseover.svg" />
                        </div>
                        <div v-if="imglist.length<maxuploadcount" class="imglist_item ml4">
                            <div class="img_plusbox">
                                <img v-on:click="choose_picture()" src="../image/photo_image.svg" />
                            </div>
                            最多支持{{maxuploadcount}}张
                        </div>
                    </div>
                </div>

            </div>
        </div>
        <!-- 数据 -->
        <div v-if="activeTab==2">
            <div class="div-header bgshadow">
                <div class="aui-searchbar">
                    <div class="aui-searchbar-input aui-searchbar-input-white aui-border-radius" style="margin: 0;">
                        <i class="icon iconfont icon-sousuo"></i>
                        <input v-model="formthird.keywords" type="search" v-on:keydown="handleEnterThird"
                            placeholder="申请单位" id="search-input">
                        <div v-if="formthird.keywords" class="new-searchbar-clear-btn"
                            v-on:click="doSearchClearThird()">
                            <i class="icon iconfont icon-guanbi"></i>
                        </div>
                    </div>
                    <div v-on:click="doSearchThird()" class="aui-searchbar-btn" tapmode
                        style="width: 1.6rem;margin-right: 0;margin-left: 0.5rem;padding-right: 0;">
                        <span>筛选</span>
                    </div>
                </div>
            </div>

            <div class="aui-content new-content-top-third">
                <div v-if="formthird.startTime!=''||formthird.endTime!=''" class="text-grey"
                    style="width: 90%;margin: 0 auto;margin-top: 10px;">
                    {{formthird.startTime}}-{{formthird.endTime}}
                </div>
                <div v-if="thirdList.length>0" v-for="(item,index) in thirdList" class="boxarea mainbox mb20"
                    style="position: relative;">
                    <div v-on:click="open_details(item)" class="work_con_box ">
                        <div class="workheader">
                            <div class="work_title_add ellipsis_one fl" style="font-weight: bold;">
                                {{item.ApplyCompany?item.ApplyCompany:'无'}}</div>
                        </div>
                        <div class="work_con_box_time marginheight">
                            <div class="work_con_box_left">通行事由</div>
                            <div class="work_con_box_right">
                                <label>{{item.VisitTypeName}}</label>
                            </div>
                        </div>
                        <div class="work_con_box_time marginheight">
                            <div class="work_con_box_left">放行有效期</div>
                            <div class="work_con_box_right">
                                <label>{{item.StartTime}}至{{item.EndTime}}</label>
                            </div>
                        </div>

                        <div class="work_con_box_time marginheight">
                            <div class="work_con_box_left">申请时间</div>
                            <div class="work_con_box_right">
                                <label>{{item.AddTime}}</label>
                            </div>
                        </div>
                        <div class="cl"></div>
                    </div>
                    <div class="new_customer_typebox new_customer_listbox">
                        <div v-on:click="open_details(item)" class="text-bold">
                            <span
                                v-bind:class="{'text-blue':item.State==1,'text-red':item.State==2,'text-grey':item.State==3||item.State==4,'text-org':item.State==3&&item.StatusName=='未放行'}">{{item.StatusName}}</span>
                        </div>
                        <div>
                            <label v-on:click="open_details(item)" class="customer_beginbtn new_customer_btn">详情</label>
                        </div>
                    </div>
                </div>
                <div v-if="thirdList.length>0" class="notodayList mb20">
                    没有更多内容
                </div>
                <div class="noinfo" v-if="thirdList.length<=0">
                    <img src="../image/index/noinfomsg_icon.png" alt="" />
                    <h5><br />暂无相关数据</h5>
                </div>
            </div>
        </div>

        <div v-if="activeTab==1" class="aui_bottom new_bottom">
            <div class="aui_bottombtn" v-on:click="do_save()">提交</div>
        </div>
    </div>
</body>
<script type="text/javascript " src="../script/api.js "></script>
<script type="text/javascript " src="../script/vue.js "></script>
<script type="text/javascript" src="../script/config.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript" src="../script/mui/mui.min.js"></script>
<script type="text/javascript" src="../script/mui/mui.picker.min.js"></script>
<script type="text/javascript" src="../script/mui/mui.poppicker.js"></script>
<script type="text/javascript" src="../script/page/dateRangeUtil.js"></script>
<script type="text/javascript" src="../script/aui-toast.js"></script>
<script type="text/javascript" src="../script/aui-tab.js"></script>
<script type="text/javascript" src="../script/aui-pull-refresh.js"></script>
<script type="text/javascript" src="../script/aui-scroll.js"></script>
<script type="text/javascript" src="../script/aui-popup.js"></script>
<script type="text/javascript " src="../script/vant/vue.js"></script>
<script type="text/javascript " src="../script/vant/vant.js"></script>
<script type="text/javascript " src="../script/moment/moment.js"></script>
<script type="text/javascript " src="js/releaserecordfxt_frm.js"></script>

</html>